﻿<%@ Page Language="C#" MasterPageFile="~/Member/UserManage.master" EnableEventValidation="false"
    ValidateRequest="false" AutoEventWireup="true" CodeFile="PurchaseManage.aspx.cs"
    Inherits="member_Trade_PurchaseManage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContInfo" runat="server">
    <script type="text/ecmascript">
        function SelectAll()
        {
            // 找到所有的 input 元素
            var ctllist = document.getElementsByTagName("input");
            var objcheckbox= document.getElementById("CheckBox2");     
            for( var i = 0; i< ctllist.length; i++)
            {
                if(ctllist[i].type == "checkbox" && ctllist[i].name.indexOf( "CheckBox1") >=0 )
                {   
                    if(objcheckbox.checked==true)     
                         ctllist[i].checked = true;
                    else
                         ctllist[i].checked = false;
                }
          
             }
         }
          function checkbox(){
        // 找到所有的 input 元素
        var ctllist = document.getElementsByTagName("input");
        var chec=false;             
        for( var i = 0; i< ctllist.length; i++){
            if( ctllist[i].type == "checkbox" && ctllist[i].name.indexOf( "CheckBox1") >=0){
                if(ctllist[i].checked==true){
                    chec=true;  
                }
            }           
        }
        if(chec==false){
            alert("请选择需要批量删除的信息!");
            return false;
        }else
        {
           return confirm("确定要批量删除选中的信息吗？");
        }    
    }  
     </script>
<div class="inkg mar_top">
    <form id="form1">
    <div id="lblmess" style="color:Red" runat="server"></div>
             <strong class="inkgt">
                管理求购信息</strong>
            <div class="intip mar_top">
            <strong class="intipt"><span id="Htab_on2" onclick="document.getElementById('important_note').style.display=='block'||document.getElementById('important_note').style.display==''?document.getElementById('important_note').style.display='none':document.getElementById('important_note').style.display='block'; document.getElementById('Htab_on2').className=='Htab_on2'?document.getElementById('Htab_on2').className='Htab_off2':document.getElementById('Htab_on2').className='Htab_on2'"
                    style="cursor: hand">重要提醒</span></strong>
            <p>
            1、"已过期"信息，网上将搜索不到！</p>
            <p>2、请您务必确认您所发布的信息真实、合法、准确、及时，未侵犯他人合法权利，以免导致不必要的纠纷！</p>
            <p>3、考虑到网站的整体利用效率，将对过期信息不定期的进行删除处理！如需继续推广，请及时重发信息！如不需要的过期信息，请及时删除！</p>
            <p>4、您的信息2小时内将发布上网,届时请上网查看。</p>
           <p>5、信息重发后到期时间将在当前时间的基础上增加10天！</p>
           <i class="lt"></i><i class="lb"></i>
        </div>
        <div class="intab mar_top" id="intab">
                <ul class="intabt">
                    <li class="<%=verify=="1"?"intabt2":"intabt1" %>"  id="menu1" onclick="javascript:window.location.href='PurchaseManage.aspx?Verify=1&class=MenuLiCheck'" >已发布上网</li>
					<li id="menu2"  class="<%=verify=="3"?"intabt2":"intabt1" %>" onclick="javascript:window.location.href='PurchaseManage.aspx?Verify=3&class=MenuLiCheck'">审核中</li>
					<li id="menu3"  class="<%=verify=="2"?"intabt2":"intabt1" %>" onclick="javascript:window.location.href='PurchaseManage.aspx?Verify=2&class=MenuLiCheck'">审核未通过</li>
					<li id="menu4" class="<%=verify=="4"?"intabt2":"intabt1" %>" onclick="javascript:window.location.href='PurchaseManage.aspx?Verify=4&class=MenuLiCheck'" >过期信息</li>
				</ul>
				        <div class="intabc" id="intabc">
            <div class="con" style="display: block">
                        <table cellpadding="0" cellspacing="0" border="0" class="edtb">
                            <thead>
				  <tr>
					<td align="center" width="50" > <strong>选项</strong></td>
					<td align="center" width="120" > <strong>图片</strong></td>
					<td align="center" width="250" > <strong>信息类型</strong></td>
					<td align="center" width="100" > <strong>到期时间</strong></td>
					<td align="center"> <strong>操作</strong></td>
				  </tr>
				</thead>
				<tbody>
				<asp:Repeater ID="dlstPurchase" runat="server" >
					<ItemTemplate>
				  <tr >
					<td width="50" align="center"><input runat="server" value='<%# DataBinder.Eval(Container.DataItem,"ID")%>' id="chk" name="chk"
                                    type="checkbox" onmouseover="this.mouse='over'" onmouseout="this.mouse='out'" /></td>
					<td width="120" align="center"><a href="/purchase/detail.aspx?id=<%# DataBinder.Eval(Container.DataItem,"ID")%>" class="table_photo" target="_blank"><asp:Image ID="Image1" runat="server" ImageUrl='<%# GetImageUrl(Eval("Thumbnail").ToString()) %>' width="80" Height="80" /></a></td>
					<td width="250" align="center"> <a href="/purchase/detail.aspx?id=<%# DataBinder.Eval(Container.DataItem,"ID")%>" target="_blank">【求购】<%# DataBinder.Eval(Container.DataItem,"Name")%> </a></td>
					<td align="center" width="100"><%# GetShortDate(DataBinder.Eval(Container.DataItem,"EndDate").ToString())%> </td>
					<td align="center"><asp:LinkButton ID="xiugai" runat="server" Text="修改" Enabled="true" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"ID")%>'
							OnCommand="xiugai_Command" /> <asp:LinkButton ID="chongfa" runat="server" Text="重发" Enabled="true" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"ID")%>'
							OnCommand="BtnChongfa" /> </td>
				  </tr>
					</ItemTemplate>
				</asp:Repeater>
					                           </tbody>
                        <tfoot>
                            <tr>
                                <td colspan="5">
                                    <p class="zi1">
                                        <input runat="server" class="checkbox" type="checkbox" id="chkall" name="chkall" onclick="CheckMinoAll();" />
                                        全选
                                        <asp:Button ID="btnDelete" runat="server" Font-Size="9pt" OnClick="btnDelete_Click"
                                            OnClientClick="return CheckSelect();return confirm('你确认要删除吗?');" Text="批量删除" CssClass="del" />
                                    </p>
                                    <p class="zi2">
                                        <%=pageStr %>
                                    </p>
                                </td>
                            </tr>
                        </tfoot>
                        </table>
				<asp:Label ID="lblMessage" runat="server" Text="Label" Visible="False"></asp:Label>
				</div>
				</div>
				</div>
				<input type="hidden" id="CheckedIDS" name="CheckedIDS" value="0" runat="server" />
    </form>
    </div>
</asp:Content>
